<!doctype html>
<html lang="">
<head>
	<meta charset="UTF-8">
	<title>投票</title>
	<link rel="stylesheet" href="common.css">
	<link rel="stylesheet" href="poll.css">
	<link rel="stylesheet" type="text/css" href="codebase/dhtmlxslider.css"/>
	<script src="poll.js"></script>
	<script src="codebase/dhtmlxslider.js"></script>
	<script src="lib/zepto.js"></script>
	<script src="common.js"></script>
	<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<body>

<div class="card-shape no-bottom-space" id="poll-fill">
	<div class="head-img"><img src="img/poll-head.png"/></div>
	<h3 id="poll-title">加载中...</h3>
	<p id="vote-type"><span>投票类型</span></p>
	<time id="poll-time" class="head-blackline"></time>
	<p id="poll-description" class="head-description"></p>


	<li id="option-">
		<div class="switcher" onclick="switcherToggle(this)"></div>
		<span id="name-" class="opname"></span>
		<input type="text" name="option[][value]" id="value-0" style="" class="opvalue">
		<input type="hidden" name="option[][item_id]" id="opid-0" class="opid">
		<div id="slider-" class="opslider"></div>
		<div id="tip-" class="optip" style="display:none;"></div>
	</li>

	<form method="post" id="poll-form" class="thre2e-level">
	<input type="hidden" name="type" value="2">
	<input type="hidden" id="poll-room" name="room_id" value="">

	<p id="using-guide-bar" class="using-guide-bar">第一次使用WeVote？<strong>了解这一新颖的投票模式！</strong></p>
	<div class="using-guide-card" style="display:none;">
		通过WeVote， 您可以展现您对每个选项的支持程度。<br>
		拖动滑块给对应的选项打分来表现您对每个选项的支持程度。分值越高，代表您越支持这一选项。<br>
		每个投票参与者的打分会按照权重汇总，得出每个选项的总体支持程度。<br>
		<a href="javascript:;" class="close-btn">我知道了</a>
		<br>
	</div>

	<div class="form-area">
		<div class="scale-tip">
			<span class="right-tip">高</span>	
			<span class="left-tip">低</span>	
			<span class="middle-tip">意愿倾向</span>	
		</div>
		<ul id="poll-list">
		</ul>
		<div class="share-btn">
			<i></i>
		</div>
	</div>

	<div class="circle-bg">
		<div id="btn">
			<button class="button circle-btn" type="button" onclick="sendFormPost()"></button><br>
			<span class="circle-label">提交投票</span>
		</div>
	</div>
	</form>

	<script>
	//document.getElementById('btn').onclick = function(){sendFormPost();}
	</script>
</div>

<div id="poll-success" style="display:none; visibility:hidden;">
	<div class="block">
	<span class="close-btn" style="display:none;"></span>
	<h3>投票成功</h3>
	<div class="main" id="view-result-allowed-message">
		<a href="###" class="highlight-btn" id="view-result">查看投票结果</a>
		<a href="" class="highlight-btn" style="display:none;">分享投票</a><br>
	</div>
	<div class="main" id="view-result-forbiden-message" style="display:none;">
		<p class="">由于房主的设置，您暂时不能查看投票结果</p>
	</div>
	</div>
</div>

<div class="copyright">
	<p class="fst">本投票使用 <a href="index.htm"><strong>WeVote</strong></a> 制作</p>
</div>


<script>


/*
{"items":[{"item_id":"2","content":"asdrtghj","user_value":0,"total_value":0},{"item_id":"3","content":"asdftgyjkl","user_value":0,"total_value":0}],"theme":"\u5fae\u8f6f\u5de5\u4f1a\u5c31\uff0c","theme_description":"\u65e0\u8272\u7684\u98ce\u683c\u548c\u5065\u5eb7\u7acb\u523b\u811a\u540e\u8ddf\u8303\u5fb7\u8428\u7684\u98ce\u683c\u4e0d\u4f1a\u90a3\u4e48","end_time":"1477974938"}
*/

getOptionData();
//addNewOption(1,{'name':'dsfgbh'});

/*** Event ***/
document.getElementsByClassName('using-guide-bar')[0].addEventListener('click', function(){
	document.getElementsByClassName('using-guide-card')[0].style.display = 'block';
});
document.querySelector('.using-guide-card .close-btn').addEventListener('click', function(){
	document.getElementsByClassName('using-guide-card')[0].style.display = 'none';
});

//getOptionCallback({"items":[{"item_id":"25","content":"\u5e05","user_value":0,"total_value":1.88187,"is_over":true},{"item_id":"26","content":"\u4e0d\u5e05","user_value":0,"total_value":4.017416,"is_over":true},{"item_id":"27","content":"\u6f02\u4eae","user_value":0,"total_value":2.617489,"is_over":true},{"item_id":"28","content":"\u4e0d\u6f02\u4eae","user_value":0,"total_value":3.4832252,"is_over":true}],"is_viewable":false,"theme":"\u5f20\u6d69\u7136\u5e05\u4e0d\u5e05","theme_description":"\u5982\u9898","end_time":"1479727520","room_type":"1"},'success');
/*//addNew(10,{title:'wowowoow'});*/
</script>

<!-- CNZZ Status -->
<script src="http://s11.cnzz.com/stat.php?id=1261578070&web_id=1261578070" language="JavaScript"></script>

</body>
</html>
